<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="java.util.List"%>

<%@include file='head.jsp'%>

<body>
<div id="page" class="shell">
	<%@include file="menu_admin.jsp" %>
	
	<!-- Main -->
	<div id="main">
		<h2>Consertos a Serem Retirados</h2>
		
		<table>
			<thead>
                            <tr>
                                <th>Num. Pedido</th>
                                <th>Cliente</th>
                                <th>Produto</th>
                                <th>Data de Entrega</th>
                                <th>Valor</th>
                            </tr>
			</thead>
			<tbody>
                            <c:if test="${listaPedido != null}">
                            <c:forEach var="pedido" items="${listaPedido}">
                                <tr>
                                    <td><c:out value="${pedido.idPedido}" /></td>
                                    <td><c:out value="${pedido.cliente.nome}" /></td>
                                    <fmt:formatDate value="${pedido.dataEntregaPrev}" pattern="dd/MM/yyyy" var="dataFormatada"/>
                                    <td><c:out value="${dataFormatada}" /></td>
                                    <td><c:out value="${pedido.valor}" /></td>
                                </tr>
                             </c:forEach>
                            </c:if>
			</tbody>
		</table>
		
	</div>
	<!-- END Main -->

	<%@include file="footer.jsp" %>
	
	<br />
</div>
</body>
</html>